/********************************************************/
/*	Copyright (C) 2012 Gong Li Bin			*/
/*	Project:	MapReduce			*/
/*	Author:		gong_libin			*/
/*	Date:		2013_05_21			*/
/*	File:		MrHub.h				*/
/********************************************************/

#ifndef	_MRHUB_H
#define	_MRHUB_H 

#include "MrTask.h"
#include "MrTmap.h"
#include "MrPool.h"
#include "MrThash.h"

#define	MR_HB_SLEEP			1000000
#define	MR_HB_VERSION			(char*)"MrHub-2.0.0"

#define	MR_HB_KEY			'H'
#define	MR_HB_PATH			(char*)"/usr/local/bin"

#define	MR_HB_SIZE			0xffff
#define	MR_HB_THASH			12289ul
#define	MR_HB_CONFIG			(char*)"SELECT Hub FROM %s.%s WHERE HostID=%s"

typedef struct tagMrHubData
{
	int m_iLength;
	UCHAR* m_puszData;
	time_t m_ulStamp;
}MRHUBDATA_S;

void MrHubRun(int iSocket);
void MrHubQuit(int iSignal);
void MrHubHelp(char* pszProc);
void* MrHubAdmin(void* pNULL);
void* MrHubAccept(void* pPara);
int MrHubConfig(char* pszConf, char* pszPort);

#endif /* _MRHUB_H */
